package com.collabscm.waf.util;

import java.io.Serializable;

/**
 * 将非序列化对象转化为可序列化对象
 *
 * @author Zeng Raoxing
 */
public class ObjectSerializable<T extends Object> implements Serializable {
	private static final long serialVersionUID = 1L;
	/**
	 * 原始对象
	 */
	private T object;
	/**
	 * 原始对象是否可序列化
	 */
	private boolean isSerializable;

	public ObjectSerializable(T obj) {
		if(obj instanceof Serializable) {
			this.isSerializable = true;
		}
		this.object = obj;
	}
	
	public T getObject() {
		return this.object;
	}
	
	public boolean isSerializable() {
		return isSerializable;
	}

}
